#ifndef __c3a_sequence_h__ 

#define __c3a_sequence_h__ 

#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include "estructures.h"

void c3a_ini_list(Code_list *cl);

void c3a_reset_line(Code_list *cl);
int c3a_emet_instr(Code_list *cl, char cadena[]);
int c3a_emet_comen(Code_list *cl, char cadena[]);
int c3a_emet_unari(Code_list *cl,  char dst[], char op[], char operan []);
int c3a_emet_binari(Code_list *cl, char dst[], char op[], char operan1[], char operan2[]);

int c3a_get_quad(Code_list *cl);


/* The number will be concatenate to the code line lineToInsert*/
int c3a_back_patching(Code_list *cl, int lineToInsert, int number);

int c3a_input_queue(Code_list *cl, Node_c3a instr);
int c3a_concatenate(Code_list *cl,int index, char cadena[]);
int c3a_output_queue(Code_list *cl, Node_c3a instr);
void c3a_print(Code_list *cl);
int c3a_write_out(Code_list *cl, char nom_arxiu[]);


void c3a_reset_list(Tlist *ll);
void c3a_insert_list(Tlist *ll, int elem);
void c3a_fusionar_list (Tlist *dst, Tlist *src);
int c3a_get_elements(Tlist *ll);
int c3a_get_elemAt(Tlist *ll, int index);

void c3a_insert_bin_list(Tlist_binary *ll,char value[], int line);
void c3a_fusionar_bin_list(Tlist_binary *dst, Tlist_binary *src);
int c3a_get_elements_bin_list(Tlist_binary *ll);
void c3a_get_elem_bin_list(Tlist_binary *ll, char value[], int *line, int index);

#endif /*__estructures_h__ */
